package com.itc.access.controller;

import com.itc.access.server.VideoServer;
import com.itc.common.core.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/video")
@Api(value = "video", tags = "视频接入")
public class VideoController {

    @Autowired
    private VideoServer videoServer;

    /**
     * 保存视频数据
     */
    @ApiOperation(value = "保存视频数据")
    @GetMapping("/setVideo")
    public R getModel(){
        R BpmModel = videoServer.domainRouting();
        return BpmModel;
    }

    @ApiOperation(value = "用户登出")
    @GetMapping("/logout/{cookie}")
    public R logout(@PathVariable("cookie") String cookie){
        R BpmModel = videoServer.logout(cookie);
        return BpmModel;
    }
}
